import Mock, { Random } from 'mockjs';
import { delay } from './utils';

Mock.mock(/^getList.*$/, 'get', {
  code: 2000,
  message: 'success',
  'data|10': [
    {
      'id|+1': 1,
      name: () => `${Random.cname()}`,
      company: () => `${Random.cname()}`,
      'role|1': ['boos', '员工']
    }
  ],
  total: 100
}).setup({ timeout: delay });
